package main

import (
	"fmt"

	"github.com/anydev/simple_gin/internal/config"
	"github.com/anydev/simple_gin/internal/router"
	"github.com/gin-gonic/gin"
)

func main() {

	gin.SetMode(gin.ReleaseMode) // 默认为 debug 模式，设置为发布模式
	engine := gin.New()
	router.InitRouter(engine) // 设置路由
	//engine.Use(middleware.LoggerToFile())
	//router.InitRouter(engine) // 设置路由
	var err = engine.Run(config.PORT)
	if err != nil {
		fmt.Println(err.Error())
	}
}
